﻿<%@ Page Language="VB" MasterPageFile="~/msrCustomer.master" AutoEventWireup="false" CodeFile="UC04-060.aspx.vb" Inherits="_114_UC04_060" %>
<asp:Content id="ctUC04060" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    &nbsp; &nbsp;<table style="width: 556px">
        <tr>
            <td align="center" style="width: 100px">
                <br />
    <asp:Label ID="lblLinhKien" runat="server" Font-Bold="True" Text="Quản Lý Loại Linh Kiện"
        Width="550px" Font-Size="Larger" ForeColor="Blue" Height="25px"></asp:Label><br />
                <br />
            </td>
        </tr>
        <tr>
            <td align="center" style="width: 100px">
                <br />
    <asp:GridView ID="GridView1" runat="server" CellPadding="3" GridLines="Vertical" Width="553px" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" Height="73px" DataKeyNames="MaLoaiLK" DataSourceID="SqlDataSource1">
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="Gainsboro" />
        <Columns>
            <asp:BoundField DataField="MaLoaiLK" HeaderText="MaLoaiLK" ReadOnly="True" SortExpression="MaLoaiLK" />
            <asp:BoundField DataField="TenLK" HeaderText="TenLK" SortExpression="TenLK" />
            <asp:BoundField DataField="NhaCC" HeaderText="NhaCC" SortExpression="NhaCC" />
            <asp:BoundField DataField="Url" HeaderText="Url" SortExpression="Url" />
            <asp:TemplateField ShowHeader="False">
                <EditItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                        Text="Update"></asp:LinkButton>
                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="Cancel"></asp:LinkButton>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandName="Edit"
                        Text="Edit"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandName="Delete"
                        Text="Delete"
                        onclientclick="return confirm('Are you sure you want ' +
                  'to delete this record?')">
                        </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
            </td>
        </tr>
    </table>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\HAIDANG_DATABASE.mdf;Integrated Security=True;User Instance=True"
        SelectCommand='SELECT [MaLoaiLK], [TenLK], [NhaCC], [Url] FROM [LOAILK]'
        UpdateCommand="UPDATE LOAILK SET MaLoaiLK = ?,TenLK=?,NhaCC=?,Url=? WHERE  MaLoaiLK = ?" CacheDuration="60" EnableCaching="True"
        DeleteCommand="DELETE FROM LINHKIEN WHERE MaLK = ?" ProviderName="System.Data.SqlClient">
        <DeleteParameters>
            <asp:ControlParameter ControlID="GridView1" Name="?" PropertyName="SelectedValue" Direction="ReturnValue" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:ControlParameter ControlID="GridView1" Name="?" PropertyName="SelectedValue" />
        </UpdateParameters>
        </asp:SqlDataSource>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    &nbsp;
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />

</asp:Content>